<?
// +----------------------------------------------------------------------
// | 分销联盟-联盟信息管理页面
// +----------------------------------------------------------------------
// | Author: TongBC <50249101@qq.com>
// +----------------------------------------------------------------------
// | Date  : 2015/03/06
// +----------------------------------------------------------------------
if(isset($_REQUEST['lists']) && $_REQUEST['lists']=='get'){
	include_once '/var/www/html/new/com.inc.php';
	$sid  = $_SESSION['sid'];
	$ctn  = array('total'=>0, 'list'=>array());
	$role = array(1=>'供销商',2=>'供应商',3=>'分销商');
	
	// condition 

	// if(isset($_REQUEST['status'])) $condition = ' and dstatus='.($_REQUEST['status'] + 0);
	
	$sql = "select u.memberID,u.dstatus,u.role_pledge,u.jointime,m.dname from pft_union_member_info_SE u left join pft_member m on m.id=u.memberID where fid=$sid";
	$GLOBALS['le']->query($sql);
	while($row=$GLOBALS['le']->fetch_assoc()){
		$roleDt = explode('|', $row['role_pledge']);
		$row['role'] = $role[$roleDt[0]];
		$row['deposit'] = $roleDt[1]/100;
        $row['pledge_status'] = $roleDt[2];
		$ctn['list'][] = $row;
	}
	// for($i=0;$i<50;$i++){
		// $tmp = $ctn['list'][0];
		// $tmp['dname'] = $ctn['list'][0]['dname'].$i;
		// $tmp['dstatus'] = mt_rand(0,3);
		// $tmp['role'] = $role[mt_rand(1,3)]; 
		// $ctn['list'][] = $tmp;
	// }
	$ctn['total'] = count($ctn['list']);
	// print_r($ctn);exit;
	exit(json_encode($ctn));
}





include '/var/www/html/new/d/common/header.html';
include'/var/www/html/new/d/common/left.html';
include '/var/www/html/new/d/tpl/alliance_mem/alliance_audit_today.tpl';
include '/var/www/html/new/d/common/footer.html';
?>